package com.csstu.tomcat.utils;

/**
 * @program: cstomcat
 * @description: Web工具类
 * @author: 程硕
 * @create: 2025-08-17 17:03
 **/
public class WebUtils {
    //将字符串转换成数字方法
    public static int parseInt(String strNum, int defaultValue) {
        try {
            int num = Integer.parseInt(strNum);
            return num;
        }catch (NumberFormatException e){
            System.out.println(strNum + "不能转换成数字");
        }
        return defaultValue;
    }
}
